package com.hz.ruoyifarmbase.basedata.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 种质类型对象 agr_germ_type
 *
 * @author xqd
 * @date 2025-03-05
 */
public class AgrGermType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 种质类型 ID */
    private Long typeId;

    /** 类型名称 */
    @Excel(name = "类型名称")
    private String typeName;

    /** 图片（eg: 豆科图片） */
    @Excel(name = "图片", readConverterExp = "e=g:,豆=科图片")
    private String typeImg;

    /** 描述说明 */
    @Excel(name = "描述说明")
    private String typeDepict;

    /** 父级 ID */
    @Excel(name = "父级 ID")
    private Long parentId;
    /** 父级 ID */
    @Excel(name = "所属科目")
    private String parentTypeName;

    public void setTypeId(Long typeId)
    {
        this.typeId = typeId;
    }

    public Long getTypeId()
    {
        return typeId;
    }
    public void setTypeName(String typeName)
    {
        this.typeName = typeName;
    }

    public String getTypeName()
    {
        return typeName;
    }
    public void setTypeImg(String typeImg)
    {
        this.typeImg = typeImg;
    }

    public String getTypeImg()
    {
        return typeImg;
    }
    public void setTypeDepict(String typeDepict)
    {
        this.typeDepict = typeDepict;
    }

    public String getTypeDepict()
    {
        return typeDepict;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    /** 子种质 */
    private List<AgrGermType> children = new ArrayList<AgrGermType>();
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("typeId", getTypeId())
            .append("typeName", getTypeName())
            .append("typeImg", getTypeImg())
            .append("typeDepict", getTypeDepict())
            .append("parentId", getParentId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    public String getParentTypeName() {
        return parentTypeName;
    }

    public void setParentTypeName(String parentTypeName) {
        this.parentTypeName = parentTypeName;
    }

    public List<AgrGermType> getChildren() {
        return children;
    }

    public void setChildren(List<AgrGermType> children) {
        this.children = children;
    }
}
